home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
A-Monthly Disks
/
(c)abk.d64
/
epson labels
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
3KB
|
74 lines
5 DV=PEEK(186)
100 REM "EPSON+G LABELS"
101 :
110 REM PRINTS A TINY 2 COLUMN LABEL ON AN EPSON/CARDCO+G PRINTER
111 :
120 REM MODIFIED BY THX1138 AND AGAIN BY ]>UG..
121 :
130 REM NOW IT WILL GET THE ]>IR OF THE LAST DRIVE YOU USED OR
131 REM POKE 186 WITH THE NUMBER OF THE DRIVE YOU WISH ]>.
140 XX=0
150 POKE53280,0:POKE53281,0:REM SET FOR BLACK SCREEN
160 PRINT "[147]PRINT A TINY 2-COLUMN DIRECTORY"
170 IF XX<>0 THEN 200
180 INPUT "[158]IS THE PRINTER ON (Y[146]/N[146]) Y[157][157][157]"; A$
190 IF A$<>"Y" THEN PRINT "[145][145]";: GOTO 180
200 DIM N$(300): REM LISTS UP TO 300 FILES ON DISK (1581!) ]>.
210 OPEN 15,DV,15:REM OPEN COMMAND CH. TO DRIVE
220 OPEN 4,4,24:REM OPEN CH. TO PRINTER
221 IF XX<>0 THEN 280
225 PRINT#4,"":REM SET XPARENT MODE
230 PRINT#4,CHR$(27)"@":REM RESET PRINTER
235 PRINT#4,CHR$(27)"A"CHR$(5);:REM SET LINE SPACING TO 5/72 INCH
240 PRINT#4,CHR$(27)"C"CHR$(21);:REM SET FORM LENGTH TO 7 LINES-USING 6LPI SCALE
250 PRINT#4,CHR$(27)"S1";:REM SUPERSCRIPT MODE ON
260 PRINT#4,CHR$(27)"U1";:REM UNIDIRECTIONAL PRINT ON
270 PRINT#4,CHR$(27)CHR$(108)CHR$(10);:REM SET LEFT MARGIN TO 10
275 PRINT#4,CHR$(27)CHR$(15);:REM COMPRESSED MODE ON
280 PRINT "[155]INSERT A DISK IN DRIVE"
285 PRINT" ALIGN THE LABEL . . ."
290 PRINT "THEN PRESS ANY KEY[154]"
300 GET A$: IF A$="" THEN 300
310 PRINT "[147]";
320 PRINT#15, "I"
330 CT=0: REM CT IS THE COUNT OF THE NUMBER OF DISK FILES
340 OPEN 2,DV,0,"$0:*"
350 GET#2, A$,A$
360 GET#2, A$,A$,A$,B$
370 A=ASC(A$+CHR$(0))+256*ASC(B$+CHR$(0)): REM CALC FILE SIZE
380 IF ST THEN 530
390 L$=""
400 IF CT THEN L$=MID$(STR$(A)+" ",2,3)
410 GET#2, A$
420 IF NOT(A$=CHR$(34) OR A$="B") THEN 410: REM SEARCH FOR " OR B
430 [137] 460
440 [161]#2, A$: [139] A$[178]"" [167] 465
450 [139] ([198](A$)[175]127)[179]32 [167] 440
451 [139] [198](A$)[177]95 [167] A$[178][199](45):[143] CONVERT USR FILE GRAPHICS TO HYPHENS
455 [139] [198](A$)[177]192 [167] A$[178][199]([198](A$)[171]128): [143] CONVERT TO COMMODORE UPPERCASE
460 L$[178]L$[170]A$: [137] 440: [143] FORM NEXT FILENAME
465 [139] CT[178]0[137]475:BRANCH [139] DISK LABEL
470 L$[178][200](L$,25):[137]480:[143] TRUNCATE TO AT MOST 22 CHARACTERS
475 L$[178][200](L$,25):[143] PRINT ALL 25 CHARACTERS FOR DISK LABEL & ID
480 N$(CT)[178]L$: [143] PUT FILENAME IN NAME ARRAY
490 [139] CT[178]0 [167] [153] "";L$;"WAIT": [137] 510: [143] PUT DISK ID IN REVERSE VIDEO
500 [153] L$: [143] LIST FILENAME ON SCREEN
510 CT[178]CT[170]1
520 [137] 360
530 [152]4,[199](27)"E";N$(0)[199](27)"F": [143] EMPHASIZE DISK LABEL & ID
540 CT[178]CT[171]1: [143] ADD FREE BLOCKS TO PRINT OUT
550 N$(CT)[178][200](N$(CT),3)[170]" "[170][202](N$(CT),4): [143] PUT BLANK IN FREE BLOCK COUNT
560 MID[178][181](CT[173]2)
565 [152]4,[199](27)"N"[199](5);
570 [129] I[178]1 [164] MID
572 [152]4, N$(I)" "N$(I[170]MID)
573 [130]
580 [139] CT[179][177]2[172][181](CT[173]2) [167] [152]4,N$(CT): [143] CASE WHEN CT IS ODD
600 [152]4,[199](12): [143] TOP OF FORM TO NEXT LABEL
620 [160] 2
630 [153] "LISTDO YOU WANT TO PRINT ANOTHER"
640 [133] "DIRECTORY (YWAIT/NWAIT) YCMDCMDCMD"; A$
650 [139] A$[178]"Y" [167] [156]: XX[178]1: [137] 160
660 [153] "CONTLOAD"
670 [128]